package com.example.imgload_sdk;

import android.widget.ImageView;



public class ImgLoad {
    public static void loadMatchImg(String url, ImageView imageView){
        GlideApp.with(imageView.getContext())
                .load(url)
                .placeholder(R.mipmap.ic_launcher)
                .error(R.mipmap.ic_launcher)
                .into(imageView);
    }
    public static void loadCirImg(String url, ImageView imageView){
        GlideApp.with(imageView.getContext())
                .load(url)
                .placeholder(R.mipmap.ic_launcher)
                .circleCrop()
                .error(R.mipmap.ic_launcher)
                .into(imageView);
    }
    public static void errorimg( ImageView imageView){
        GlideApp.with(imageView.getContext())
                .load(R.drawable.errors)
                .into(imageView);
    }

    public static void loadThumbnail(String thumbnailUrl,String srcUrl, ImageView imageView){
        GlideApp.with(imageView.getContext())
        .load(srcUrl)
        .thumbnail(GlideApp.with(imageView.getContext())
                .load(thumbnailUrl)).into(imageView);
    }

}
